<div data-page="Subject_tiku" class="page my_subject lesson_detail" >
 <input type="hidden" id="knowsid" value="<{$knowsid}>" />
 <script>
 var video_info=<{:json_encode($knowsData['video_info'])}>;
 </script>
	<style>
	.tabPaneContent{ padding:10px; min-height:200px}
	</style>
	<div class="page-content" >
	<div style=" height:50px"></div>
 <div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container"> 
		<a class="nav_back text" href="<{:U('Subject/lesson',array('subjectid'=>$subjectid))}>">&lt;返回</a>
			<div class="navbar-collapse">
				 <div class="" style="margin:0px" id="lessonList_bnt">
        <div class="" id="lessonList_div" >
          <a class="lesson_name">
            <span id="lesson_title"><{$knowsData.knows}><em></em></span>
          </a>
          <div id="lessonList" class=" pull-left" style="width:100%; display:none">
            <h3>课程目录</h3>
            <div class="scrollcont">
              <ul class="detaillist ps-container" data-ps-id="88a0fb91-a23b-288e-8658-be865b4f10e3" style="display: block;">
			  <volist name="knowsList" id="vo">
			  <li id="ncre"><a href="<{:U('Subject/lesson_detail',array('knowsid'=>$vo['knowsid'],'subjectid'=>$subjectid))}>" class="studyvideo"><{$vo.knows}><!--<i class="
glyphicon glyphicon-unchecked"></i>--></a></li>
			  </volist>

			</ul>
            </div>
          </div>
        </div>
      </div>
				 
			</div>
		</div>
	</div>
</div>
 <div id="hide-content">
				<div class="col-md-8 mgt10">
						<div id="videoWrapper" style="overflow:hidden; min-height:220px; width:100%;"  >
							 
						</div>
				</div>
		</div>		
				<div  class="action_box  col-md-4 mgt10 wap-padding-0"  style="background-color:#fff; padding-top:10px;">
					<div id="action_box"  data-type="swiperPage" style=" position:relative"> 
					<ul class="nav nav-tabs text swiperTap" >
						<li class="active" style="margin-left:10px"><a href="#detail_notes" class="text-center" data-toggle="tab">笔记</a></li>
						<li class=""><a href="#post_ask" class="text-center" data-toggle="tab">提问</a></li>
						<li class=""><a href="#questions" class="text-center" data-toggle="tab">练习</a></li>
					</ul>
					<div class="tab-content swiperContent">
						<div class="tab-pane active tabPane" id="detail_notes">
						<div class="tabPaneContent">
							 <textarea style="width:100%; height:120px" id="contentNote"><{:strip_tags($notes)}></textarea>
							<button id="btnSaveLessonNote" onclick="save_notes()" class="btn mgt20 btn-large btn-block btn-success" data-loading-text="保存中…" >保存</button>
							</div>
						</div>
						<div class="tab-pane tabPane" id="post_ask">
						<div class="tabPaneContent">
						<{:Widget('BoxSns/Topic/topicList/tpl/topicListWap',array('type'=>'eduAsk','where'=>array('pid3'=>$knowsid),'form'=>array('pid'=>$subjectid,'pid2'=>$knowsData['knowssectionid'],'pid3'=>$knowsData['knowsid'])))}>	
					 </div>
						</div>
						
						<div class="tab-pane tabPane" id="questions">
								<div class="tabPaneContent">
							 <{:Widget('BoxEdu/Questions/subject_exercise',array('examid'=>$examid))}>
								</div>
						</div>
					</div>
    </div>
				</div>
		 
	</div>
	<script>
	//var CKobject;
	$(function(){
		$("#lessonList_bnt").click(function(event){
  $(".page-content #lessonList").show();	
		event.stopPropagation()
		event.preventDefault()
})	
$("body").click(function(){
	$(".page-content #lessonList").hide();
})
	})


$("#action_box").on("swiperSlide",function(event,swiper){
 	if(swiper.activeIndex==2){
		  $("#hide-content").slideUp(500);
				CKobject.getObjectById('ckplayer_videoWrapper').videoPause();
				 $('.page-content').animate({scrollTop:0});
		}else{
			 $("#hide-content").slideDown(500);
				//CKobject.getObjectById('ckplayer_videoWrapper').videoPlay();
		}
})	
$("#videoWrapper").on("videoPlay",function(event){
			 // alert("videoPlay");	
				 <if condition="$knowHistory['play_time']">
				  CKobject.getObjectById('ckplayer_videoWrapper').videoSeek(<{$knowHistory['play_time']}>);
					</if>	
			})	
			$("#videoWrapper").on("videoPause",function(event){
			//  alert('videoPause');	
			})	
			//监听时间
			var timeArr={};
			$("#videoWrapper").on("videoTime",function(event){
				   // console.log(video_info);
								var play_id = "ckplayer_videoWrapper"; 
								var data=CKobject.getObjectById(play_id).getStatus();
								var time=parseInt(data['time']);
								if(time%2==0 && typeof(timeArr[time])=="undefined"){
									 $.post("/Subject/user_play_video",{type:1,time:time,knowsid:"<{$knowsid}>"})
								}
									timeArr[time]=time;
			})
			
			$("#videoWrapper").on("videoStop",function(event){
								var play_id = "ckplayer_videoWrapper"; 
								$.post("/Subject/user_play_video",{type:2,knowsid:"<{$knowsid}>"}) 
			})
			 	
			
	</script>
</div>
 
 
